<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/1/11
  Time: 14:21
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <link rel="stylesheet" type="text/css" href="../css/css.css">
    <link rel="stylesheet" type="text/css" href="../css/amazeui.min.css">
    <script type="text/javascript" src="../js/jquery-3.3.1.min.js"></script>
</head>
<body>

<div id="pageAll">
    <div class="pageTop">
        <div class="page">
            <img src="../images/admin/coin11.png" /><span><a href="../manage/index.html" target="_top">首页</a>&nbsp;-&nbsp;-</span>&nbsp;新闻管理
        </div>
    </div>

    <div class="page">
        <!-- user页面样式 -->
        <div class="connoisseur">
            <div class="conform">
                <div class="cfD">
                    <a href="../manage/user-add.jsp" target="main"><button class="userbtn" style="width: 100px; height: 35px">添加</button></a>
                </div>
            </div>
            <!-- user 表格 显示 -->
            <div class="conShow">
                <table border="1" cellspacing="0" cellpadding="0">
                    <tr>
                        <td width="160px" class="tdColor tdC">用户</td>
                        <td width="160px" class="tdColor">用户名</td>
                        <td width="160px" class="tdColor">性别</td>
                        <td width="350px" class="tdColor">Email</td>
                        <td width="300px" class="tdColor">手机</td>
                        <td width="240px" class="tdColor">操作</td>
                    </tr>
                    <c:forEach items="${userList}" var="u">
                        <tr height="40px" class="li">
                            <td>${u.euUserId}</td>
                            <td>${u.euUsername}</td>
                            <td>${u.euSex}</td>
                            <td>${u.euEmail}</td>
                            <td>${u.euMobile}</td>
                            <td>
                                    <a href="../userQueryServlet?euUserId=${u.euUserId}">
                                         <img class="operation" src="../images/admin/update.png">
                                     </a>
                                     &nbsp;&nbsp;
                                     <a href="javascript:if(confirm('确定?'))location='../userdeleteVisit?euUserId=${u.euUserId}';">
                                     <img class="operatio ndelban" src="../images/admin/delete.png">
                                     </a>
                        </tr>
                    </c:forEach>

                </table>
            </div>
            <!-- user 表格 显示 end-->


        </div>
        <!-- user页面样式end -->
        <div class="am-fr">
            <ul class="am-pagination">
                <li class="am-active"><a href="../userVisitServlet?pageIndex=1">首页</a></li>
                <li><a href="../userVisitServlet?pageIndex=${pageIndex-1}">上一页</a></li>
                <li> <a href="../userVisitServlet?pageIndex=${pageIndex+1}">下一页</a></li>
                <li>  <a href="../userVisitServlet?pageIndex=${totalPages}">尾页</a></li>
            </ul>
        </div>
    </div>



</div>
</body>
<script>
    var upuver='${updatas}';
    if (upuver=='asd'){
        alert("更新操作失败")
    }
    var addsc='${addname}'
    if (addsc=='yes'){
        alert("添加失败用户ID已存在")
    }
    var addscv='${add}'
    if (addscv=='yes'){
        alert("添加失败")
    }
    var deasb='${deas}'
    if (deasb=='yes'){
        alert("无法删除管理员")
    }
</script>

</html>

